'''
Created on Oct 21, 2009

@author: kage
'''

from PyBatch.handlers import base

class AudioExtractor(base.MuxBase):
    def start(self, args=None):
        q = '"'
        self.__inputPath = args['inputPath'].replace('\\', '/')
        self.__outputPath = args['outputPath'].replace('\\', '/')
        self.__audio_track = args['audio_track']
        
        self.__command = q + self.mkvExtractPath + q + " tracks " + q + self.__inputPath + q
        self.__command += " " +  self.__audio_track  + ':' + q + self.__outputPath + q
        
        self.setCommandLine(self.__command)
        self.muxOperation()
